package com.cyl.manager.pms.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.sincere.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * sku信息
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "pms_sku")
public class Sku {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "sku_snapshot_id")
    private Long skuSnapshotId;

    @TableField(value = "product_id")
    private Long productId;

    /**
     * sku编码
     */
    @TableField(value = "out_sku_id")
    private String outSkuId;

    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 展示图片
     */
    @TableField(value = "pic")
    private String pic;

    /**
     * 库存
     */
    @TableField(value = "stock")
    private Integer stock;

    /**
     * 商品销售属性，json格式
     */
    @TableField(value = "sp_data")
    private String spData;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    private Long updateBy;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 删除标志 0 未删除 1 删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty("删除标志状态")
    @Excel(name = "删除标志状态")
    @TableLogic
    private Boolean deleted;

    public static final String COL_ID = "id";

    public static final String COL_SKU_SNAPSHOT_ID = "sku_snapshot_id";

    public static final String COL_PRODUCT_ID = "product_id";

    public static final String COL_OUT_SKU_ID = "out_sku_id";

    public static final String COL_PRICE = "price";

    public static final String COL_PIC = "pic";

    public static final String COL_STOCK = "stock";

    public static final String COL_SP_DATA = "sp_data";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DELETED = "deleted";
}